import sys
import re

if len(sys.argv)<2:
     print("usage:")
     exit(0)

myfile = open(sys.argv[1], "r")

ll=[]
l=[]
for line in (myfile):
	if len(line)==0:
		continue
		
	if line.startswith('\t'):
		c=1
	else:
		c=0
			
	s=line.strip(' \t\n')
	
	if c==0:
		syntax=''
		synopsis=''
		ex=''
		s1=s.split('\t')
		if len(s1)>2:
			synopsis=s1[2]		
		if len(s1)>3:
			ex=s1[3]
		if len(s1)>1:
			syntax=s1[1]
			
		l=[s1[0],syntax,synopsis,[ex]]
		ll.append(l)
	else:
		l[3].append(s)

for x in ll:
	print('opcode:%s\n\t%s\n\t%s'%(x[0],x[1],x[2]))
	for ex in x[3]:
		print('-\t%s'%(ex))
